package com.zr.wodedingdan.controller;


import com.zr.util.ResultBuildVo;
import com.zr.util.ResultVo;
import com.zr.wodedingdan.service.WodedingdanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2019/7/3 0003.
 */
@RestController
public class WodedingdanController {
    @Autowired
    private WodedingdanService paymentInformationService;
    /**
     * 修改我的订单
     *
     */
    @PostMapping("update")
    public ResultVo update(HttpServletRequest request){
        Integer id= (Integer) request.getSession().getAttribute("loginId");
        if(id==null){
            return ResultBuildVo.error("请重新登陆","500");
        }
        return paymentInformationService.update(id);
    }
}
